package site.luojie.utils;

import com.alibaba.druid.pool.DruidDataSource;

/**
 * @Description: Druid数据源工具类
 * @Author jie.luo
 * @Create: 2020-04-30 23:12
 **/
public class DruidDataSourceUtil {

    private DruidDataSourceUtil() {
    }

    private static DruidDataSource druidDataSource = new DruidDataSource();

    static {
        druidDataSource.setDriverClassName("com.mysql.jdbc.Driver");
        druidDataSource.setUrl("jdbc:mysql://luojie.site:33306/demo");
        druidDataSource.setUsername("root");
        druidDataSource.setPassword("123456");
    }

    public static DruidDataSource getInstance() {
        return druidDataSource;
    }
}
